import{createRouter, createWebHashHistory} from 'vue-router'

// 定义路由配置数组并显式指定类型
const routes = [
    {
        // 当搜索其他页面的时候，都会提示这个问题
        path: "/:pathMatch(.*)*", // 必备
        component: () => import('../views/not-found/404.vue'),
    },
    {
      path: '/',
      name: 'web',
      component: () => import('../views/web/index.vue')// 需要指定一个组件
    },
    {
        path:'/login',
        name:'login',
        component: () => import('../views/login/login.vue')
    },
    {
        path:'/dashborad',
        name:'dashborad',
        component: () => import('../views/dashborad/index.vue')
    },
    {
        path:'/ps',
        name:'ps',
        component:() => import('../views/ps/index.vue')
    }
]

const router = createRouter({
    history:createWebHashHistory(),
    routes
})


// 导出路由
export default router